package com.resys.service.impl;

import com.resys.mappers.RoomshowMapper;
import com.resys.service.RoomshowService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("roomshowService")
public class RoomshowServiceImpl implements RoomshowService {
    @Resource
    private RoomshowMapper roomshowMapper;
    @Override
    public Integer getImageCount(Integer roomId) {
        return roomshowMapper.getImageCount(roomId);
    }

    @Override
    public String getImgName(Integer roomId, Integer index) {
        return roomshowMapper.getImgName(roomId,index-1);
    }

    @Override
    public void deleteImg(Integer roomId, Integer index) {
        roomshowMapper.deleteImg(roomId,index-1);
    }

    @Override
    public void addImg(Integer roomId, String newFileName) {
        roomshowMapper.addImg(roomId,newFileName);
    }
}
